package com.community.service;


import com.community.common.ServerResponse;
import com.community.pojo.User;
import com.community.pojo.UserInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public interface IUserService {


    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
    ServerResponse<User> login(String username, String password);

    /**
     * 注册
     * @param param
     * @return
     */
    ServerResponse<String> register(Map param, HttpServletRequest request);

    /**
     * 更新用户信息
     * @param userMap
     * @return
     */
    ServerResponse<User> updateInformation(Map userMap);

    /**
     * 修改密码
     * @param param
     * @param request
     * @return
     */
    ServerResponse<String> forgetRestPassword(Map param, HttpServletRequest request);

    /**
     * 修改密码发送验证码
     * @param param
     * @param request
     * @return
     */
    ServerResponse<String> updatePasswordSendMessageCode(Map param, HttpServletRequest request);

    /**
     * 登录修改密码
     * @param paramMap
     * @param request
     * @return
     */
    ServerResponse<String> loginUpdatePassword(Map paramMap, HttpServletRequest request);

    /**
     * 登陆后查询用户详情
     * @param request
     * @return
     */
    ServerResponse<UserInfo> selectUserInfoByUsername(HttpServletRequest request);
}
